package cn.yj.cgs.dba.entity.vo;

import cn.yj.commons.utils.StringUtils;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author 永健
 * @since 2021-05-14 17:31
 */
@Data
@Accessors(chain = true)
public class ArticleFormVo {
    /**
     * <br>
     */
    private String articleNo;

    /**
     * <br>
     */
    private String userCode;

    private String content;

    /** 是否置顶 */
    private Boolean isTop;

    /** 1：匿名 0：正常 */
    private Boolean isAnon;

    private String images;

    private String video;

    private String type;

    private String newLocation;

    public List<String> getImages() {
        return StringUtils.isNotBlank(images)?new ArrayList<>(Arrays.asList(images.split("&&"))):new ArrayList<>();
    }
}
